//
//  ListCell.h
//  Dispatch
//
//  Created by hyeyeon on 14. 1. 14..
//  Copyright (c) 2014년 hyeyeon. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

#import "AppDelegate.h"
#import "IssueView.h"
#import "MyView.h"
#import "BattleView.h"
#import "BattlingObjectView.h"
#import "PopupView.h"
#import "NKLabel.h"

@class AppDelegate;

#pragma mark -
#pragma mark - <<첫번째 테이블쎌>>

//사진 두개씩 보여주는 리스트
@interface ListCell : UITableViewCell
{
    AppDelegate *appDelegate;
    
    UIImageView *iconImage;
    
    
    //이슈 : 핫이슈
    NSMutableArray *itemHeadArray;
    NSTimer *rollingTimer;
    UIButton *leftArrowButton;  //왼쪽 화살표
    UIButton *rightArrowButton; //오른쪽 화살표
    CGRect centerFrame;
    CGRect leftFrame;
    CGRect rightFrame;
    UIImageView *topIssue;
    
    //center
    UIImageView *centerImage;
    UILabel *centerTitle;
    UIImageView *dotImage;
    
    //무한배틀순위에서 필요한 오브젝트
    UIImageView *winIcon;
    NKLabel *leftWinLabel;
    NKLabel *leftLoseLabel;
    NKLabel *rightWinLabel;
    NKLabel *rightLoseLabel;
    
    NSDictionary *hotissueImages;
    
    UIImageView *leftDefaultView;
    UIImageView *rightDefaultView;
    
}
@property (nonatomic,assign) id delegate;
@property (nonatomic,retain) UIButton *centerButton;
@property (nonatomic,retain) UIButton *leftButton;
@property (nonatomic,retain) UIButton *rightButton;
@property (nonatomic,retain) UIImageView *leftImage;
@property (nonatomic,retain) UIImageView *rightImage;
@property (nonatomic,retain) UILabel *leftTitle;
@property (nonatomic,retain) UILabel *rightTitle;
@property (nonatomic,retain) UIImageView *leftBand;
@property (nonatomic,retain) UIImageView *rightBand;
@property (nonatomic,retain) UILabel *leftNumberLabel;
@property (nonatomic,retain) UILabel *rightNumberLabel;
@property (nonatomic,retain) UIImageView *leftIcon;
@property (nonatomic,retain) UIImageView *rightIcon;
@property (nonatomic,retain) UIImageView *winIcon;

//이슈
-(void)cellOfIssueWithHotList:(NSArray *)hotissueList andFirstTitle:(NSString *)firstTitle andSecondTitle:(NSString *)secondTitle;
-(void)cellLeftIconImage:(UIImage*)leftIconImage;   //왼쪽 아이콘
-(void)cellRightIconImage:(UIImage*)rightIconImage; //오른쪽 아이콘

//이슈 : 핫이슈 롤링
-(void)startHotissueRolling;
-(void)stopHotissueRolling;

//무한배틀순위보기
-(void)setLeftWinString:(NSString*)win andLoseString:(NSString*)lose;
-(void)setRightWinString:(NSString*)win andLoseString:(NSString*)lose;

@end


#pragma mark -
#pragma mark - <<두번째 테이블쎌>>
//사진 한개씩만 보여주는 리스트(검색>이슈)
@interface  SecondTypeListCell : UITableViewCell
{
    
    AppDelegate *appDelegate;
}
@property (nonatomic,retain) UIImageView *photoImage;
@property (nonatomic,retain) UILabel *dateTitle;
@property (nonatomic,retain) UILabel *mainTitle;
@property (nonatomic,retain) UILabel *subTitle;

@end

#pragma mark - 
#pragma mark - <<3. MY/Follow 테이블뷰>>

@interface FollowTableViewCell : UITableViewCell
{
    AppDelegate *appDelegate;
    UIView *unfollowCellView;
    UIView *generalView;
    UILabel *starName;
    UIButton *checkButton;
}
@property (nonatomic, assign) id delegate;
@property (nonatomic, retain) NSString *mStarID;

-(void)appearUnfollow;  //언팔로우
-(void)appearStarName:(NSString*)name andID:(NSString*)starID andCheck:(BOOL)check; //일반
@end


#pragma mark -
#pragma mark - <<4. MY/설정 테이블뷰>>

@interface SettingTableViewCell : UITableViewCell <PopupViewDelegate>
{
    UIView *noticeView;
    UILabel *titleLabel;
    UIButton *checkButton;
    UIButton *removeButton;
    AppDelegate *appDelegate;
    UIButton *versionLabel;
}
@property (nonatomic, retain) UIImageView *iconImage;
@property (nonatomic, assign) id delegate;
@property (nonatomic, assign) NSInteger mIndex;
@property (nonatomic, retain) UILabel *titleLabel;
@property (nonatomic, retain) UIButton *checkButton;


-(void)setString:(NSString*)string andCheckButtonHidden:(BOOL)checkHidden andremoveButtonHidden:(BOOL)removeHidden;
@end


#pragma mark -
#pragma mark - <<5. MY/관심이슈 테이블뷰>>

@interface MyIssueTableViewCell : UITableViewCell
{
    
    UILabel *dateLabel;
    UILabel *titleLabel;
    UILabel *starLabel;
    UIImageView *upImage;
    UILabel *upLabel;
    UIImageView *downImage;
    UILabel *downLabel;
    UIImageView *line1;
    UIImageView *line2;
    
    UIView *bottomContentView;
}
@property (nonatomic, assign) id delegate;
@property (nonatomic, retain) UIImageView *photoImage;

-(void)setDate:(NSString*)dateString andMediaType:(NSString*)media andTitle:(NSString*)title andStar:(NSString*)star andUpClick:(BOOL)upClick andDownClick:(BOOL)downClick andUpCount:(NSString*)upCount andDownCount:(NSString*)downCount;


@end

#pragma mark - 
#pragma mark - <<6. 배틀/배틀중인셀>>

@interface BattlingTableCell : UITableViewCell <UIScrollViewDelegate>
{
    AppDelegate *appDelegate;
    
    UIScrollView *mScrollView;
    NSInteger firstIndex;
    NSInteger secondIndex;
    
    float photoWidth;
    
    UIView *firstView;
    UIView *secondView;
    UIView *thirdView;
    
    UIImageView *firstImageView;
    UIImageView *secondImageView;
    UIImageView *thirdImageView;
    
    
    
    UIImageView *circleImageView;
    NSMutableArray *imageArray;

    CAShapeLayer *pathLayer;
}
@property (nonatomic, assign) id delegate;
@property (nonatomic, retain) NSArray *battlingArray;

-(void)setArray:(NSArray*)list andFistIndex:(NSInteger)first andSecondIndex:(NSInteger)second;
-(void)settingBattling:(NSArray*)battling;
-(void)startAnimation;

@end

#pragma mark -
#pragma mark - <<7. 배틀/지난순위셀>>

@interface BattleRankingTableCell : UITableViewCell
{
    
}

@property (nonatomic, assign) id delegate;
@property (nonatomic, retain) UIImageView *firstImage;
@property (nonatomic, retain) UIImageView *secondImage;
@property (nonatomic, retain) UIImageView *thirdImage;
@property (nonatomic, retain) UILabel *dateLabel;

-(void)setDateLabelWithWeek:(NSNumber*)week andMonth:(NSNumber*)month;

@end

